home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload Trio 2 / Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO / dir42 / gnudbm14.zip / DBM.PRO < prev    next >
Text File  |  1990-08-14  |  2KB  |  73 lines

  1. /* gdbm.h  -  The include file for dbm users.  */
  2.  
  3. /*  This file is part of GDBM, the GNU data base manager, by Philip A. Nelson.
  4.     Copyright (C) 1990  Free Software Foundation, Inc.
  5.  
  6.     GDBM is free software; you can redistribute it and/or modify
  7.     it under the terms of the GNU General Public License as published by
  8.     the Free Software Foundation; either version 1, or (at your option)
  9.     any later version.
  10.  
  11.     GDBM is distributed in the hope that it will be useful,
  12.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.     GNU General Public License for more details.
  15.  
  16.     You should have received a copy of the GNU General Public License
  17.     along with GDBM; see the file COPYING.  If not, write to
  18.     the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  19.  
  20.     You may contact the author by:
  21.        e-mail:  phil@wwu.edu
  22.       us-mail:  Philip A. Nelson
  23.                 Computer Science Department
  24.                 Western Washington University
  25.                 Bellingham, WA 98226
  26.         phone:  (206) 676-3035
  27.        
  28. *************************************************************************/
  29.  
  30. /* Parameters to gdbm_open for READERS, WRITERS, and WRITERS who
  31.    can create the database. */
  32. #define  GDBM_READER  0        /* A reader. */
  33. #define  GDBM_WRITER  1        /* A writer. */
  34. #define  GDBM_WRCREAT 2        /* A writer.  Create the db if needed. */
  35. #define  GDBM_NEWDB   3        /* A writer.  Always create a new db. */
  36.  
  37. /* Parameters to gdbm_store for simple insertion or replacement in the
  38.    case that the key is already in the database. */
  39. #define  GDBM_INSERT  0        /* Never replace old data with new. */
  40. #define  GDBM_REPLACE 1        /* Always replace old data with new. */
  41.  
  42.  
  43. /* The data and key structure.  This structure is defined for compatibility. */
  44. typedef struct {
  45.     char *dptr;
  46.     int   dsize;
  47.       } datum;
  48.  
  49.  
  50. /* The file information header. This is good enough for most applications. */
  51. typedef struct {int dummy[10];} *GDBM_FILE;
  52.  
  53.  
  54. /* These are the routines! */
  55.  
  56. extern GDBM_FILE gdbm_open ();
  57.  
  58. extern void     gdbm_close ();
  59.  
  60. extern datum     gdbm_fetch ();
  61.  
  62. extern int     gdbm_store ();
  63.  
  64. extern int     gdbm_delete ();
  65.  
  66. extern datum     gdbm_firstkey ();
  67.  
  68. extern datum     gdbm_nextkey ();
  69.  
  70. extern int     gdbm_reorganize ();
  71.  
  72.  
  73.